package com.cloudlead.plugin.security.query;

import static com.mysema.query.types.PathMetadataFactory.*;
import com.cloudlead.plugin.security.entity.EScRole;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QScRole is a Querydsl query type for EScRole
 */
@Label("角色查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QScRole extends RelationalPathBase<EScRole> {

    private static final long serialVersionUID = 830728061;

    public static final QScRole scRole = new QScRole("sc_role");

    public class PrimaryKeys {

        public final PrimaryKey<EScRole> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScGroupHasRole> _scGroupHasRoleScRole1Fk = createInvForeignKey(id, "sc_role_id");

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScRoleHasPrivilege> _scRolePrivilegeScRole1Fk = createInvForeignKey(id, "sc_role_id");

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScUserHasRole> _scUserHasRoleScRole1Fk = createInvForeignKey(id, "sc_role_id");

    }

    public final BooleanPath available = createBoolean("available");

    public final StringPath description = createString("description");

    public final StringPath id = createString("id");

    public final StringPath name = createString("name");

    public final StringPath pid = createString("pid");

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QScRole(String variable) {
        super(EScRole.class, forVariable(variable), "null", "sc_role");
        addMetadata();
    }

    public QScRole(String variable, String schema, String table) {
        super(EScRole.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QScRole(Path<? extends EScRole> path) {
        super(path.getType(), path.getMetadata(), "null", "sc_role");
        addMetadata();
    }

    public QScRole(PathMetadata<?> metadata) {
        super(EScRole.class, metadata, "null", "sc_role");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(available, ColumnMetadata.named("available").withIndex(4).ofType(Types.BIT).notNull());
        addMetadata(description, ColumnMetadata.named("description").withIndex(3).ofType(Types.VARCHAR).withSize(255));
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(name, ColumnMetadata.named("name").withIndex(2).ofType(Types.VARCHAR).withSize(100).notNull());
        addMetadata(pid, ColumnMetadata.named("pid").withIndex(5).ofType(Types.CHAR).withSize(24));
    }

}

